package com.dragon.test.service.impl;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import com.dragon.test.dao.ICustomerDao;
import com.dragon.test.service.ICustomerService;

@Service(value = "customerService")
public class CustomerServiceImpl implements ICustomerService {

	@Value(value = "dragon")
	private String name;

	@Autowired
	@Qualifier("customerDao")
	// @Resource(name = "customerDao")
	private ICustomerDao customerDao = null;

	public ICustomerDao getCustomerDao() {
		return customerDao;
	}

	public void setCustomerDao(ICustomerDao customerDao) {
		this.customerDao = customerDao;
	}

	@Override
	public void saveCustomer() {
		System.out.println(name + ":执行业务层！");
		customerDao.saveCustomer();
	}

}
